package com.jd.platform.gobrs.client.manager;

import com.jd.platform.gobrs.client.handler.auto.AutoCache;

/**
 * @program: gobrs
 * @ClassName AutoCacheManager
 * @description:
 * @author: sizegang
 * @create: 2022-01-08 16:26
 * @Version 1.0
 **/
public class AutoCacheManager extends AbstractCacheManager {

//    Lock lock = new ReentrantLock(false);
//    @Resource
//    private BootstrapProperties bootstrapProperties;

    private AutoCache autoCache = new AutoCache();


    @Override
    Object doGetCache(String key) {
        return autoCache.getCache(key);
    }

    @Override
    public boolean setCache(String key, Object value) {
        try {
            autoCache.setCache(key, value);
        } catch (Exception ex) {
            return false;
        }
        return true;
    }

    @Override
    public boolean isHotKey(String key) {
        return false;
    }
}
